package catalina.startup;

import catalina.connection.Connector;
import catalina.container.Container;

import java.util.List;

public class StandardService implements LifeCycle {

    private String name;

    private List<Connector> connectorList;

    private Container container;

    public Container getContainer() {
        return container;
    }

    public void setContainer(Container container) {
        this.container = container;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Connector> getConnectorList() {
        return connectorList;
    }

    public void setConnectorList(List<Connector> connectorList) {
        this.connectorList = connectorList;
    }


    @Override
    public void init() {
        this.container.init();
        for (Connector connector : connectorList) {
            connector.init();
        }
    }

    @Override
    public void start() {
        this.container.start();
        for (Connector connector : connectorList) {
            connector.start();
        }

    }

    @Override
    public void stop() {

    }

    @Override
    public void destroy() {

    }
}
